# -*- coding: utf-8 -*-
"""
Created on Sun Apr 12 21:19:32 2020

@author: wjx
"""
#效验两个大文件的一致性
import os
import hashlib

path1 = r'E:\python_program\老男孩笔记\day24总结复习\test.mp4'
path2 = r'F:\学习\python\老男孩\day25\02 python fullstack s21day25 super和mro.mp4'
size = os.path.getsize(path1)
ret2 = os.path.getsize(path2)

md5 = hashlib.md5()
with open(path1,mode='rb') as f:
    while size > 1024:
        content = f.read(1024)
        md5.update(content)
        size -= 1024
    else:
        content = f.read(size)
        md5.update(content)
        size = 0
print(md5.hexdigest())